package gof.com.yew.singleton;

/**
 * 静态内部类
 * 线程安全、调用效率高、可延迟加载
 * @author yw
 */
public class SingletonDemo04 {
	
	//定义静态内部类
	private  static class SingletonClassInstance{
		private static final  SingletonDemo04 instance = new SingletonDemo04();
	}
	
	//构造器私有
	private SingletonDemo04() {
		
	}
	
	public static SingletonDemo04 getInstance() {
		return SingletonClassInstance.instance;
	}
	
}
